#!/bin/sh
# - test
# - need_x
# - option_a
# - option_b
# - option_c
# - option_d
# - option_e
# - option_f

## The Phoronix Test Suite is the most comprehensive testing and benchmarking
## platform available that provides an extensible framework for which new tests
## can be easily added.

xinitrc=$LKP_SRC/programs/phoronix-test-suite/phoronix-test-suite.xinitrc

if [ "$need_x" = true ]; then
	xrandr > /dev/null 2>&1
	if [ $? -eq 0 ];then
		mkdir -p		/tmp/.X11-unix
		chmod 1777		/tmp/.X11-unix
		chown root:root		/tmp/.X11-unix

		xinit $xinitrc
	else
		Xvfb :1 -screen 0 1024x768x24 &
		export DISPLAY=:1
		$xinitrc
	fi
else
	$xinitrc
fi
